package com.kingwang.training.designpattern.state.bo;

/**
 * 电梯门开启
 */
public class OpenState implements LiftState {
    @Override
    public LiftState open() {
        System.out.println("电梯门已开启");
        return this;
    }

    @Override
    public LiftState close() {
        System.out.println("电梯关门");
        return new CloseState();
    }

    @Override
    public LiftState run() {
        System.out.println("电梯门开启状态下无法运行");
        return this;
    }

    @Override
    public LiftState stop() {
        System.out.println("电梯门开启状态下无法停靠");
        return this;
    }

    @Override
    public void doSomething() {
        System.out.println("OPEN do something");
    }
}
